
package com.fjsh.properties;

import java.util.UUID;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

@Data
@Component
@ConditionalOnProperty(value = {"security.oauth2.resource.enable"}, matchIfMissing = true)
public class OAuth2ClientProperties {

	/**
	 * OAuth2 client id.
	 */
	@Value("${security.oauth2.client.client-id}")
	private String clientId;

	/**
	 * OAuth2 client secret. A random secret is generated by default.
	 */
	@Value("${security.oauth2.client.client-secret}")
	private String clientSecret = UUID.randomUUID().toString();

	@Value("${security.oauth2.resource.token-info-uri}")
	private String tokenInfoUri;
}
